<template>
	<view>
		<view class="backBox">
			<view>
				<view>户名</view>
				<view>{{bankInfo.bankAccountName || '暂无'}}</view>
			</view>
			<view>
				<view>开户银行</view>
				<view>{{bankInfo.bankName || '暂无'}}</view>
			</view>
			<view>
				<view>银行账号</view>
				<view>{{bankInfo.bankAccount || '暂无'}}</view>
			</view>
			<view>
				<view>支行名称</view>
				<view>{{bankInfo.bankBranch || '暂无'}}</view>
			</view>
			<view>
				<view>银行代码</view>
				<view>{{bankInfo.swiftCode || '暂无'}}</view>
			</view>
		</view>
		<view class="btnCass" @click="changeBankFunc">修改银行信息</view>
	</view>
</template>

<script>
	import {
		getMemberBank
	} from '@/api/directSelling.js';
	export default {
		data() {
			return {
				bankInfo:{}
			}
		},
		created() {
			this.getMemberBank();
		},
		methods: {
			getMemberBank(){
				getMemberBank().then((res)=>{
					let data=res.data;
					this.bankInfo=data;
					this.bankInfo.bankAccountName=uni.getStorageSync('userInfo').realName;
				})
			},
			changeBankFunc(){
				uni.navigateTo({
					url: "/pages/electronicWallet/bankCardDo/changeBank"
				});
			}
		}
	}
</script>

<style lang="scss">
	body,
	page {
		background: #fff;
		padding:20rpx 30rpx;
		box-sizing: border-box;
	}
	.backBox{
		width:100%;
		height:auto;
		border:1px solid #eee;
		border-radius:20rpx;
		padding:20rpx 30rpx;
		box-sizing: border-box;
		>view{
			display: flex;
			justify-content: space-between;
			align-items: center;
			line-height:80rpx;
			font-size:28rpx;
		}
	}
	.btnCass{
		width:90%;
		height:86rpx;
		line-height:86rpx;
		text-align:center;
		background:$theme-color;
		border-radius: 120rpx;
		margin:50rpx auto;
		color:#fff;
	}
</style>
